<script>
$(document).ready(function(){
	/* 定义账号验证规则 */
	jQuery.validator.addMethod("usernameReg", function(value, element) { 
		var reg = /^[a-zA-Z0-9-_.]{3,32}$/;
		if(reg.test(value)){
			return true;
		}else{
			return false;
		}
		}, "只能由数字、字母、下划线组成，3-32个字符");

	// validate signup form on keyup and submit
	var validator = $("#admin_channel").validate({
                rules: {			
                channel_name: "required"
		},
		messages: {			
                channel_name: "请输入渠道名称"
		},
                

	});
});
</script>
<!-- Page content -->
<div id="page">
    <!-- Wrapper -->
    <div class="wrapper" >
        <?php if(isset($_SESSION['message'])&&$_SESSION['message']){
                        echo 
                        "<div id=\"message\"  style=\"width:99%;\" class=\" box\">
                    	{$_SESSION['message']}					
                         </div>
                         <script>
                         $('#message').fadeIn(1000); 
                         $('#message').fadeOut(1000); 
                         $('#message').fadeIn(1000); 
                         $('#message').fadeOut(1000);
                         $('#message').fadeIn(1000); 
                         $('#message').fadeOut(1000);
                        </script>
                        ";
                    }
                            $_SESSION['message'] = '';
                    ?>
        <h3>编辑渠道</h3>
        <!--<span class="subtitle">编辑新的渠道</span>-->
        <hr>
        <div id="tabs" class="ui-tabs">
            <ul class="ui-tabs-nav">
                <li><a class="corner-tl" href="/admin_channel/index">渠道列表</a></li>
                <li class='ui-tabs-selected'><a class="corner-tr" href="#">编辑渠道</a></li>
            </ul>
            <div id="tabs-1" class="ui-tabs-panel">
                <form id="admin_channel" method="post" action="/admin_channel/update">
                    <table class="stylized full">
                        <input type="hidden" value="<?php echo $music_info[0]; ?>" name="channel_number"/>
                        <tr id="p_name">
                            <td><span class="red">*</span>渠道名称</td>
                            <td><input type="text" class="half" size="28" name="channel_name" value="<?php echo $music_info[1]; ?>" id="channel_name" value='' maxLength="50"/><label for="channel_name"></label></td>
                        </tr>
                      
                        <tr>
                            <td></td>
                            <td><input type="submit" value="编辑渠道" class="btn btn-green big"> &nbsp;&nbsp; 
                                <input class="btn" type="reset" value="重置"></td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="clear">&nbsp;</div>
        </div>
    </div>
    <!-- End of Wrapper -->
</div>
<!-- End of Page content -->